<?php
require_once "ajax.php";
$ajax = ajax();
$vars = array(
        'hello' => 'world',
        'world' => 'hello!',
        'someVar' => 'someValue',
        'x' => 'y'
);
 
$ajax->post = $vars;
$ajax->Exec('btPost' , $ajax->call("ajax.php?testAjax/postResult",'divResponse'));
 
?>
<html>
<head>
<meta charset="UTF-8">
<title>POST</title>
<?php echo $ajax->init();?>
</head>
<body>
<h2>POST</h2>
<input type='button' id='btPost' value='Cliquer sur le bouton'>
<div id="divResponse">divResponse</div>
</body>
</html>